﻿using UnityEngine;
using System.Collections;

/// <summary>
/// 游戏玩家信息
/// </summary>
public class GamePlayerInfo {

    /// <summary>
    /// 用户编号
    /// </summary>
    int _uid;
    public int uid { get { return _uid; } }

    /// <summary>
    /// 用户名字
    /// </summary>
    string _name;
    public string name { get { return _name; } }

    /// <summary>
    /// 头像
    /// </summary>
    string _headpic;
    public string headpic { get { return _headpic; } }

    /// <summary>
    /// 分数
    /// </summary>
    int _score;
    public int score { get { return _score; } }

    /// <summary>
    /// 地址
    /// </summary>
    string _ip;
    public string ip { get { return _ip; } }

    /// <summary>
    /// 胡息
    /// </summary>
    int _rScore;
    public int rScore { get { return _rScore; } }

    /// <summary>
    /// 是否在线
    /// </summary>
    bool _online;
    public bool online { get { return _online; } set { _online = value; } }

    /// <summary>
    /// 是否庄家
    /// </summary>
    bool _dealer;
    public bool dealer { get { return _dealer; } set { _dealer = value; } }

    /// <summary>
    /// 玩家信息
    /// </summary>
    /// <param name="initArgs"></param>
    public GamePlayerInfo(HashtableEx initArgs)
    {
        _uid = initArgs.GetInt("uid");
        _name = initArgs.GetString("name");
        _headpic = initArgs.GetString("headpic");
        _ip = initArgs.GetString("ip");
        _online = initArgs.GetBoolean("online");
        _rScore = 0;
        _dealer = false;
    }
}
